home *** CD-ROM | disk | FTP | other *** search
- #include <utility/hooks.h>
- #include <strings.h>
- #include "_cat.h"
-
-
- struct ListEntry
- {
- char Name[64];
- char Number[64];
- };
-
- APTR list_dsplfunc(struct Hook *a0, APTR *a2, APTR a1)
- {
- if (a1)
- {
- *a2++=((struct ListEntry*)a1)->Name;
- *a2=((struct ListEntry*)a1)->Number;
- }
- else
- {
- *a2++=GetDialString(MSG_LV_Name);
- *a2=GetDialString(MSG_LV_Number);
- }
- return NULL;
- }
-
- APTR list_cmpfunc(struct Hook *a0, APTR a2, APTR a1)
- {
- return (APTR)strcmp(a1,a2); /* directly compare structure, because Name-String is first entry */
- }
-
-
- APTR list_consfunc(struct Hook *a0, APTR a2, APTR a1)
- {
- struct ListEntry *NewEntry = (struct ListEntry*)malloc(sizeof(struct ListEntry));
-
- memcpy(NewEntry, a1, sizeof(struct ListEntry));
-
- return NewEntry;
- }
-
- APTR list_desfunc(struct Hook *a0, APTR a2, APTR a1)
- {
- free(a1);
- }
-
-